Connection

interface Connection

Facilitates connections to the Rainbow Cloud Services. This module enables your application to authenticate users using their credentials and monitor the connection state with the Rainbow Cloud Services. Developers can utilize this module for establishing user sign-in procedures and managing the real-time state of connectivity with the Rainbow Services.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Enumerates the states of the SDK's connection with Rainbow Cloud Services.

Link copied to clipboard

Interface defining callbacks for handling various connection-related events and errors within the SDK.

Properties

Link copied to clipboard

Represents the current state of the Connection.

Functions

Link copied to clipboard
abstract suspend fun fetchUserAuthenticationUrls(    login: String,     lang: String = Locale.getDefault().toLanguageTag()): RainbowResult<AuthenticationUrl>

Enables you to retrieve the authentication method linked to a user.

Link copied to clipboard

Registers an implementation of IConnectionListener to receive callbacks when the SDK's connection state changes.

Link copied to clipboard
abstract suspend fun requestPasswordLessCode(login: String): RainbowResult<PasswordLessCodeData>

If the user is using AuthenticationType.PASSWORDLESS then he will have to request a code generation to be able to login with signInWithPasswordLessCode.

Link copied to clipboard
abstract fun resetCacheAndDatabase()

Manually resets the image cache and database.

Link copied to clipboard
abstract suspend fun signIn(login: String, password: String): RainbowResult<Unit>

Initiates a sign-in process using the provided login credentials.

abstract suspend fun signIn(login: String, password: String, host: String? = null): RainbowResult<Unit>

Initiates a sign-in process using the provided login credentials and an optional custom host URL.

Link copied to clipboard
abstract suspend fun signInWithMFACode(mfaCode: String, trusted: Boolean): RainbowResult<Unit>

Initiates a sign-in process using Multi-Factor Authentication (MFA) generated code.

Link copied to clipboard
abstract suspend fun signInWithMFAVerification(mfaVerification: String): RainbowResult<Unit>

Initiates a sign-in process using Multi-Factor Authentication (MFA) verification code.

Link copied to clipboard
abstract suspend fun signInWithOidcToken(token: String): RainbowResult<Unit>

Initiates a sign-in using the provided OpenID Connect (OIDC) token.

abstract suspend fun signInWithOidcToken(token: String, host: String? = null): RainbowResult<Unit>

Initiates a sign-in using the provided OpenID Connect (OIDC) token and an optional host URL.

Link copied to clipboard
abstract suspend fun signInWithPasswordLessCode(login: String, code: String): RainbowResult<Unit>

Initiates a sign-in process using password less generated code.

Link copied to clipboard
abstract suspend fun signInWithToken(token: String): RainbowResult<Unit>

Initiates a sign-in process using the provided authentication token.

abstract suspend fun signInWithToken(token: String, host: String? = null): RainbowResult<Unit>

Initiates a sign-in process using the provided authentication token and an optional custom host URL.

Link copied to clipboard
abstract fun signOut()

Signs out the current user.

Link copied to clipboard

Unregisters a previously registered IConnectionListener, stopping callbacks for SDK's connection state changes.